<template>
	<view class="special-group">
		<view class="go-home" @click="backHome">
			<image :src="imglink + 'home/home-Selected.png'" mode="aspectFill"></image>
		</view>
		<!-- 团购活动课程轮播图 -->
		<view class="special-group-swiper">
			 <view v-if="images.length>0">
			 	<swiper 
					class="swiper" 
					v-if="images.length > 0"
					:indicator-dots="indicatorDots" 
					:autoplay="autoplay" 
					:interval="interval" 
					:duration="duration"
				>
			 		<swiper-item class="discounts-page" v-for="(image,index) in images" :key='index'>
			 			<image :src="image" mode="scaleToFill" style="width: 100%;"></image>
						<view v-if="index == 0">封面</view>
			 		</swiper-item>
			 	</swiper>
			 </view>
			 <view v-else class="swiper-none">
				<view>暂无图片</view>
			 </view>
			 <view class="choose-img">
			 	<view class="choose-swiper-img">
			 		请选择封面轮播图（最少1张，最多4张，第1张是封面）
			 	</view>
				<view class="choose-img-details">
					<view class="choose-img-common" @click="uploadBanner(0)" v-if="images.length < 1">
						<image class="updata-img" :src="imglink + 'member/manage_icon_camera.png'" mode="aspectFill"></image>
						<view class="upload-img">+上传图片</view>
						<view class="img-num">1</view>
					</view>
					<view class="choose-img-common" v-else>
						<image class="choose-img-detail" :src="images[0]" mode="aspectFill" style="width: 100%;height: 100%;margin: 0;"></image>
						<view class="masking"></view>
						<view class="img-num">1</view>
						<view class="updata" @click="uploadBanner(0)">更换照片</view>
						<image class="delete-upload-imf" :src="imglink + 'member/manage-active_icon_delete.png'" mode="aspectFill"  @click="delBanner(0)"></image>
					</view>
					<view class="choose-img-common" @click="uploadBanner(1)" v-if="images.length < 2">
						<image class="updata-img" :src="imglink + 'member/manage_icon_camera.png'" mode="aspectFill"></image>
						<view class="upload-img">+上传图片</view>
						<view class="img-num">2</view>
					</view>
					<view class="choose-img-common" v-else>
						<image class="choose-img-detail" :src="images[1]" mode="aspectFill" style="width: 100%;height: 100%;margin: 0;"></image>
						<view class="masking"></view>
						<view class="img-num">2</view>
						<view class="updata" @click="uploadBanner(1)">更换照片</view>
						<image class="delete-upload-imf" :src="imglink + 'member/manage-active_icon_delete.png'" mode="" @click="delBanner(1)"></image>
					</view>
					<view class="choose-img-common"  @click="uploadBanner(2)" v-if="images.length < 3">
						<image class="updata-img" :src="imglink + 'member/manage_icon_camera.png'" mode="aspectFill"></image>
						<view class="upload-img">+上传图片</view>
						<view class="img-num">3</view>
					</view>
					<view class="choose-img-common" v-else>
						<image class="choose-img-detail" :src="images[2]" mode="aspectFill" style="width: 100%;height: 100%;margin: 0;"></image>
						<view class="masking"></view>
						<view class="img-num">3</view>
						<view class="updata" @click="uploadBanner(2)">更换照片</view>
						<image class="delete-upload-imf" :src="imglink + 'member/manage-active_icon_delete.png'" mode="aspectFill"  @click="delBanner(2)"></image>
					</view>
					<view class="choose-img-common"  @click="uploadBanner(3)" v-if="images.length <4">
						<image class="updata-img" :src="imglink + 'member/manage_icon_camera.png'" mode="aspectFill"></image>
						<view class="upload-img">+上传图片</view>
						<view class="img-num">4</view>
					</view>
					<view class="choose-img-common" v-else>
						<image class="choose-img-detail" :src="images[3]" mode="aspectFill" style="width: 100%;height: 100%;margin: 0;"></image>
						<view class="masking"></view>
						<view class="img-num">4</view>
						<view class="updata" @click="uploadBanner(3)">更换照片</view>
						<image class="delete-upload-imf" :src="imglink + 'member/manage-active_icon_delete.png'" mode="aspectFill" @click="delBanner(3)"></image>
					</view>
				</view>
			 </view>
		</view>
		<!-- 活动标题与时间设置 -->
		<view class="act-time-title">
			<view class="explain-title">
				<view class=""></view>
				<view class="">
					活动标题
				</view>
			</view>
			<view class="act-title-tip">
				<textarea 
					v-model="name" 
					placeholder="活动标题最多50个字" 
					maxlength='50'
					@input="handleInputName"
				/>
				<view class="">{{ name.length }}/50</view>
			</view>
			<view class="explain-title" style="margin-top: 40upx;">
				<view class=""></view>
				<view class="">
					活动时间设置
				</view>
			</view>
			<view class="act-time-set">
				<view class="">
					开始时间
				</view>
				<view class="start-data">
					<picker mode="date" :value="start_date" @change="handleChangeStartDate">
						<view>{{ start_date }}</view>
					</picker>
				</view>
				<view class="start-time">
					<picker mode="time" :value="start_time" @change="handleChangeStartTime">
						<view>{{ start_time }}</view>
					</picker>
				</view>
			</view>
			<view class="act-time-set">
				<view class="">
					结束时间
				</view>
				<view class="start-data">
					<picker mode="date" :value="end_date" @change="handleChangeEndDate">
						<view>{{ end_date }}</view>
					</picker>
				</view>
				<view class="start-time">
					<picker mode="time" :value="end_time" @change="handleChangeEndTime">
						<view>{{ end_time}}</view>
					</picker>
				</view>
			</view>
		</view>
		<!-- 活动课程设置 -->
		<view class="act-course-set">
			<view class="explain-title">
				<view class=""></view>
				<view class="">
					活动课程设置
				</view>
			</view>
			<view class="act-title">
				<view class="">
					活动科目名额设定
				</view>
				<input type="number" v-model="allowed_total" placeholder="请输入活动科目总名额" />
			</view>
			<view class="add-num">
				<view class="">
					<text>剩余20%自动增加名额(每次增加20个）</text>
					<switch :checked="enable_auto_add_allowed_total" @change="handleEnableAutoAddAllowedTotal" color="#FF8B46"/>
				</view>
				<view class="">开启后,活动名额低于20%时，系统将自动增加20个名额</view>
			</view>
			<view class="virtual-join">
				<view class="">
					<view class="">
						默认虚拟报名科目数
					</view>
					<input type="number" v-model="virtual_total" placeholder="请输入虚拟的报名科目数"/>
				</view>
				<view class="">
					激发用户从众心理，报名人数=默认虚拟报名科目+实际报名数
				</view>
			</view>
			<view class="buy-course-count">
				<view class="buy-course-count-set">
					<view class="">
						<text>每人限购课程数量</text>
						<switch :checked='enable_allowed_purchase_quantity' @change="handleEnableAllowedPurchaseQuantity" color="#FF8B46"/>
					</view>
					<view class="buy-course-amount">
						<image :src="imglink + 'home/reduce_black.png'" mode="aspectFill" @click="handleSubtractAllowPurchaseQuantity"></image>
						<view class="">{{ allowed_purchase_quantity }}</view>
						<image :src="imglink + 'home/add-colours.png'" mode="aspectFill" @click="handleAddAllowPurchaseQuantity"></image>
					</view>
				</view>
				<view class="">
					开启限购数量，每个用户活动报名科目数不能超过设定数量
				</view>
			</view>
		</view>
		<!-- 买课赠课福利设置 -->
		<view class="give-course-coupon">
			<view class="act_explain-title">
				<view class="explain-title" style="margin-top: 12upx;">
					<view class=""></view>
					<view class="">
						买课赠课福利设置
					</view>
				</view>
				<view class="explain_tip">
					<switch :checked='enable_purchase_course_then_give_course' @change="handleEnablePurchaseCourseThenGiveCourse" color="#FF8B46"/>
				</view>
			</view>
			<view class="give-course-tip">
				开启后，家长本活动买满几课程，可以免费送几课程，谨慎操作
			</view>
			<view class="buy-give-course">
				例：买<text>3</text>个课程送<text>1</text>个课程
			</view>
			<view class="buy-give-course-num">
				<view class="buy-give-course-details">
					<text>买</text>
					<view class="">
						<image :src="imglink + 'home/reduce_black.png'" mode="aspectFill" @click="handleSubtractPurchaseCourseQuantity"></image>
						<view class="">{{ purchase_course }}</view>
						<image :src="imglink + 'home/add-colours.png'" mode="aspectFill" @click="handleAddPurchaseCourseQuantity"></image>
					</view>
					<text>课</text>
				</view>
				<view class="buy-give-course-details" style="margin-left: 100upx;">
					<text>送</text>
					<view class="">
						<image :src="imglink + 'home/reduce_black.png'" mode="" @click="handleSubtractGiveCourseQuantity"></image>
						<view class="">{{ give_course }}</view>
						<image :src="imglink + 'home/add-colours.png'" mode="" @click="handleAddGiveCourseQuantity"></image>
					</view>
					<text>课</text>
				</view>
			</view>
		</view>
		<!-- 拼团设置 -->
		<view class="group-set" v-if="type=='group_purchase'">
			<view class="explain-title">
				<view class=""></view>
				<view class="">
					拼团设置
				</view>
			</view>
			<view class="clustering-num">
				<view class="">成团人数</view>
				<input 
					type="number" 
					v-model="group_purchase.quanlity_group_purchase" 
					placeholder="请输入成团人数，最少2人"
					@input="handleInputQuantityGroupPurchase"
				/>
			</view>
			<view class="is-open-group">
				<view class="is-open-group-content">
					<view class="is-open-group-choose">
						<text>是否开启虚拟成团</text>
						 <switch 
							:checked='group_purchase.enable_virtual_group_purchase' 
							@change="handleEnableVirtualGroupPurchase" 
							color="#FF8B46"
						/>
					</view>
					<view class="is-open-group-time" v-if="group_purchase.enable_virtual_group_purchase">
						<view class="is-open-group-hour">
							 <radio-group 
								style="display: block;" 
								@change="handleChangeEndGroupPurchaseType"
							>
								<label style="display: flex;" class="uni-list-cell uni-list-cell-pd">
									<view>
										<radio color="#FF8B46" value="0" :checked="group_purchase.end_group_purchase_type" />
									</view>
									<view style="display: flex;">
										<text>用户开团后</text>
										<input type="number" v-model="group_purchase.end_group_purchase_hour"/>
										<text>小时自动成团</text>
									</view>
								</label>
								<label style="display: flex;" class="uni-list-cell uni-list-cell-pd">
									<view>
										<radio color="#FF8B46" value="1" :checked="group_purchase.end_group_purchase_type" />
									</view>
									<view style="display: flex;">
										<text>活动结束后</text>
									</view>
								</label>
							</radio-group>
						</view>
					</view>
				</view>
				<view class="is-open-group-tip">
					开启虚拟成团后，当用户拼团不成功时，自动成团谨慎操作
				</view>
			</view>
			<view class="group-defeated">
				<view class="group-defeated-title">
					拼团失败是否退款
				</view>
				<view class="group-defeated-details">
					<view class="group-defeated-content">
						<radio-group @change="handleChangeRefundType">
							<label style="display: flex;" class="uni-list-cell uni-list-cell-pd">
								<view>
									<radio color="#FF8B46" value="0" :checked="group_purchase.refund_type == '0'" />
								</view>
								<view>不退款，线下协商退款</view>
							</label>
							<label style="display: flex;" class="uni-list-cell uni-list-cell-pd">
								<view>
									<radio color="#FF8B46" value="1" :checked="group_purchase.refund_type == '1'" />
								</view>
								<view>系统自动退款给用户</view>
							</label>
						</radio-group>
					</view>
				</view>
			</view>
			<view class="header-welfare">
				<view class="header-welfare-title">
					<text>团长福利</text>
					<switch :checked='group_purchase.enable_head_welfare' @change="handleEnableHeadWelfare" color="#FF8B46"/>
				</view>
				<view class="header-welfare-input"  v-if="group_purchase.enable_head_welfare">
					<textarea 
						v-model="group_purchase.head_welfare_content" 
						placeholder="请输入团长福利内容" 
						@input="handleInputHeadWelfareContent"
					/>
				</view>
			</view>
			<view class="is-show-other-group">
				<view class="is-show-other-group-title">
					<text>报名页面是否显示“参与他人的团”</text>
					<switch :checked='group_purchase.show_other_group_purchase' @change="handleShowOtherGroupPurchase" color="#FF8B46"/>
				</view>
				<view class="is-show-other-group-tip">
					开启后，在拼团报名页面，可以用户可以直接点“参与他人团”,享受成团价；不开启，用户只能通过参团链接，来参与拼团。
				</view>
			</view>
		</view>
		
		<!-- 参与活动课程 -->
		<view class="join-act-course">
			<view class="course_type-title" id="courseTitle">
				<view class="">参与活动课程</view>
			</view>
			<view 
				id="actCourse" 
				class="join-act-course-details" 
				v-if="courses.length > 0" 
				v-for="(course,index) in courses" 
				:key='index'
			>
				<image :src="imglink + 'member/manage-active_icon_delete.png'" mode="aspectFill" style="left: -20upx;" @click="delCourse(index)"></image>
				<image :src="imglink + 'member/rank.png'" @click="sortCourse(index)" mode="aspectFill" style="right: -20upx;"></image>
				<view class="explain-title">
					<view class=""></view>
					<view class="">课程{{index+1}}</view>
				</view>
				<view class="join-course-title">
					<view 
						class="join-course-title-img" 
						@click="changeCourseImage(index)" 
						v-if="course.image != ''"
					>
						<image :src="course.image" mode="aspectFill"></image>
						<view class="masking"></view>
						<view class="change-photo">更换照片</view>
					</view>
					<view 
						class="no-img" 
						v-else 
						@click="uploadCourseImage(index)"
					>
						<image :src="imglink + 'member/manage_icon_camera.png'" mode="aspectFill"></image>
						<view>+上传图片</view>
					</view>
					<view class="join-course-title-input">
						<textarea v-model="course.name" placeholder="请输入课程标题" maxlength="30" @input="handleInputCourseName(index)"/>
						<view>{{ course.name.length }}/30</view>
					</view>
				</view>
				<view class="commodity-original-price">
					<view>商品原价(元)</view>
					<input type="digit" v-model="course.origin_price" placeholder="请输入商品原价"/>
				</view>
				<view class="alone-buy-discounts">
					<view>单独购买优惠价(元)</view>
					<input type="digit" v-model="course.special_price" placeholder="请输入商品优惠价"/>
				</view>
				<view class="join-group-price" v-if="type == 'group'">
					<view class="join-group-price-content">
						<view>参团价格(元)</view>
						<input type="digit" v-model="course.group_purchase_price" placeholder="请输入商品参团价"/>
					</view>
				</view>
				<view class="join-group-price-tip">不能低于1元，有人报名后不可修改</view>
				<view class="restricted-purchase">
					<view class="restricted-purchase-content">
						<view class="restricted-purchase-content-open">
							<text>每人限购课程数量</text>
							<switch :checked='course.enable_limit_course' @change="handleEnableLimitCourse(index)" color="#FF8B46"/>
						</view>
						<view class="restricted-purchase-content-num">
							<image :src="imglink + 'home/reduce_black.png'" mode="aspectFill" @click="handleSubtractLimitCourseQuantity(index)"></image>
							<view class="">{{course.limit_course}}</view>
							<image :src="imglink + 'home/add-colours.png'" mode="aspectFill" @click="handleAddLimitCourseQuantity(index)"></image>
						</view>
					</view>
					<view class="restricted-purchase-tip">开启限购数量，每个人不可超过限购数量</view>
				</view>
				<view class="give-shopping-card">
					<view class="give-shopping-card-content">
						<text>给家长赠送现金购物卡</text>
						<switch :checked='course.isGive' @change="switch1ChangeGive($event,item,index)" color="#FF8B46"/>
					</view>
					<view class="give-shopping-card-tip">开启限购数量，每个人不可超过限购数量</view>
				</view>
				<view class="give-shopping-card-money">
					<view>赠送购物卡面值金额</view>
					<input type="digit" :disabled="!course.isGive" v-model="course.cash_shopping_card_amount" placeholder="最少100，需要100整倍数" @blur="shoppingCardPrice($event,item,index)"/>
				</view>
				<view class="give-shopping-card-details">
					<view>扣除购物卡渠道成本价：<text>¥{{course.cardCostPrice}}</text></view>
					<view>说明：家长下单购买后才会赠送购物卡，最低100元，需要是100的整数倍。根据购物卡面值，自动计算购物的渠道成本价，从家长报名费中扣除；购物激活后，不可线上退款；赠送购物卡成本价不能超过课程最低价格；赠送的课程，不送现金购物卡.</view>
				</view>
				<view class="act-address">
					<view class="act-address-title" style="width: 23%;">
						活动门店
					</view>
					<view class="act-address-choose" @click="handleChooseSaleroom(index)">
						<text>请选择参与门店</text>
						<image :src="imglink + 'home/arrow-right.png'" mode="aspectFill"></image>
					</view>
				</view>
				<view class="shop-name">
					<view class="" v-for="(saleroom,sindex) in course.salerooms" :key='sindex'>
						<view class="">{{ saleroom.name }}</view>
						<image :src="imglink + 'member/management_icon_textdelete.png'" mode="" @click="delSaleroom(num,item)"></image>
					</view>
				</view>
				<view class="subject-details">
					<view class="subject-details-title" @click="showDetail(item,index)">
						<text>课程详情</text>
						<text>（选填）</text>
						<image :src="imglink + 'member/check-details.png'" mode=""></image>
					</view>
					<view class="text-img-content" v-if="item.showDetails">
						<view class="text-img-details" >
							<view class="" v-for="(src,i) in item.activity_course_description" :key='i'>
								<view class="img-details" v-if="item.activity_course_description.length > 0 && ( src.type == 'photo' || src.image!=null)">
									<image class="img-content" :src="src.value || src.image" mode="widthFix"></image>
									<view class="masking"></view>
									<image class="delete-img" :src="imglink + 'member/manage-active_icon_delete.png'" mode="" @click="delCourseImg(i,item.activity_course_description)"></image>
									<image class="rank-img" :src="imglink + 'member/rank.png'" mode="" @click="rankcourseDetail(i,src,item)"></image>
									<view class="change-img" @click="changeDetailImg(src,index,i)">
										更换图片
									</view>
								</view>
								<view class="text-details" v-if="item.activity_course_description.length > 0 && (src.type == 'text' || src.text!= null)">
									<textarea :value="src.value || src.text" placeholder="请输入文字介绍" @input="gainValue($event,src)"/>
									<image class="delete-img" @click="delText(i,item.activity_course_description)" :src="imglink + 'member/manage-active_icon_delete.png'" mode=""></image>
									<image class="rank-img" :src="imglink + 'member/rank.png'" mode="" @click="rankcourseDetail(i,src,item)"></image>
								</view>
							</view>
							<view class="add-img-text">
								<view class="add-details" @click="addImg(item,index)">
									<image :src="imglink + 'member/add-img.png'" mode=""></image>
									<text>添加图片</text>
								</view>
								<view class="add-details" @click="addText(item,index)">
									<image :src="imglink + 'member/add-text.png'" mode=""></image>
									<text>添加文字</text>
								</view>
							</view>
						</view>
						<view class="pack-up-details" @click="packUpDetail(item,index)">
							<text>收起详情</text>
							<image :src="imglink + 'member/member-right-two.png'" mode=""></image>
						</view>
					</view>
				</view>
			</view>
			<view class="add-course" @click="handleAddCourse">+添加新课程</view>
		</view>
		<!-- 报名信息收集表单 -->
		<view class="apply-msg">
			<view class="explain-title">
				<view class=""></view>
				<view class="">
					报名信息收集表单
				</view>
			</view>
			<view class="apply-msg-contain">
				<view class="apply-msg-all">
					收集信息
				</view>
				<view class="apply-msg-content">
					<text v-for="(field,index) in collect_info_form" :key='index'>
						*{{field.name}}
					</text>
				</view>
			</view>
			<view class="add-form-click">
				<view class="add-course" @click="addForm">
					编辑添加新表单
				</view>
				<view class="add-form-tip">
					点击按钮，可以添加新的信息收集字段
				</view>
			</view>
		</view>
		<!-- 活动详情页 -->
		<view class="act-detail" style="margin-bottom: 120upx;">
			<view class="explain-title">
				<view class=""></view>
				<view class="">
					活动详情页
				</view>
			</view>
			<view 
				class="act-detail-contain" 
				v-if="description.length>0"
			>
				<view 
					class="" 
					v-for="(item,index) in description" 
					:key='index'
				>
					<view 
						class="img-details" 
						style="margin-bottom: 30upx;" 
						v-if="item.image"
					>
						<image class="img-content" :src="item.value" mode="widthFix"></image>
						<view class="masking"></view>
						<image class="delete-img" @click="delActImg(index)" :src="imglink + 'member/manage-active_icon_delete.png'" mode=""></image>
						<image class="rank-img" :src="imglink + 'member/rank.png'" mode="" @click="rankActDetail(item,index)"></image>
						<view class="change-img" @click="changeActImg(item,index)">
							更换图片
						</view>
					</view>
					<view v-else class="text-details" style="margin-bottom: 30upx;">
						<textarea :value="item.text" placeholder="请输入文字介绍" @input="gainValue($event,item)"/>
						<image class="delete-img" @click="delActText(index)" :src="imglink + 'member/manage-active_icon_delete.png'" mode=""></image>
						<image class="rank-img" @click="rankActDetail(item,index)" :src="imglink + 'member/rank.png'" mode=""></image>
					</view>
				</view>
			</view>
			<view class="add-img-text" style="margin-top: 38upx;">
				<view class="add-details" @click="addImage">
					<image :src="imglink + 'member/add-img.png'" mode=""></image>
					<text>添加图片</text>
				</view>
				<view class="add-details" @click="addActText">
					<image :src="imglink + 'member/add-text.png'" mode=""></image>
					<text>添加文字</text>
				</view>
			</view>
		</view>
		<!-- 预览暂存或者立刻发布活动 -->
		<view class="act-status">
			<view class="act-common" @click="handlePreview">预览活动</view>
			<view class="act-common" @click="handleStag">暂存活动</view>
			<view class="act-common publish" @click="handlePublish">立刻发布</view>
		</view>
		
		<!-- 发布成功弹框 -->
		<uni-popup ref="actPublish" :custom="true">
			<view class="popup_box_de">
				<view class="popup_box_succed-img">
					<image :src="imglink + 'member/pop_icon_success2.png'" mode=""></image>
				</view>
				<view class="popup_box-title-succed">
					恭喜你，活动发布成功！
				</view>
				<view class="popup_box-invite" @click="share">
					立即邀请本活动参与员工
				</view>
				 <!-- @click="inviteStaff" -->
			</view>
		</uni-popup>
		<!-- 活动暂存 -->
		<uni-popup ref="actStorage" :custom="true">
				<view class="popup_box_de" style="padding-top: 32upx;">
					<view class="popup_box_succed-img">
						<image :src="imglink + 'member/pop_icon_warning2.png'" mode=""></image>
					</view>
					<view class="popup_box-title-succed">
						活动已经暂存，请绑收款银行卡
					</view>
					<view class="popup_box-tip">
						请先绑定银行卡，否则将导致活动无法收款
					</view>
					<view class="popup_box-invite" style="margin-top: 38upx;" @click="bindingCard">
						立刻去绑卡
					</view>
					<view @click="bindingCardNo" class="popup_box-invite" style="margin-top: 38upx;background: #F3F3F4;color: #666666;box-shadow: none;">
						暂不绑卡
					</view>
				</view>
			</uni-popup>
	</view>
</template>

<script>
	import uniPopup from '@/components/uni-popup/uni-popup.vue'
	import {uploadFile} from '@/common/alioss.js'
	//#ifdef H5
	import wx from '@/common/wx-js-sdk.js'
	//#endif
	import {formatChatTime,formaAlltTime} from '@/common/util.js'
	
	export default {
		data() {
			return {
				imglink: this.$store.state.imgLink,
				store_id:0,
				token:'',
				/* 轮播图配置参数*/
				indicatorDots: true,
				autoplay: false,
				interval: 2000,
				duration: 500,
				/* 当前时间参数 */
				// year:'',
				// month:'',
				// day:'',
				// hour:'',
				// minute:'',
				// second:'',
				/*** 活动信息 ***/
				type:'group_purchase',//活动类型，'group_purchase'团购，'special'优惠
				name:'',
				images:[],
				start_date:'',
				start_time:'',
				end_date:'',
				end_time:'',
				allowed_total:0,
				enable_auto_add_allowed_total:true,
				virtual_total:0,
				enable_allowed_purchase_quantity:true,
				allowed_purchase_quantity:0,
				enable_purchase_course_then_give_course:true,
				purchase_course:0,
				give_course:0,
				group_purchase:{
					quanlity_group_purchase:0,
					enable_virtual_group_purchase:true,
					end_group_purchase_type:true,
					end_group_purchase_hour:24,
					refund_type:true,
					description:'',
					enable_head_welfare:true,
					head_welfare_content:'',
					show_other_group_purchase:true,
				},
				/**
				 * 活动课程列表信息；
				 * 每个课程信息 
				 * activity_id,name,image,origin_price,special_price,group_purchase_price,
				 * limit_course,give_cash_shopping_card_to_parents,cash_shopping_card_amount
				 * sales_rooms[](activity_id,course_id,salesroom_id)
				 * descript[]({activity_id,course_id,image,text,sort_order})
				 */
				courses:[],
				course_item:{//每项课程包含的内容
					name:'',
					image:'',
					origin_price:'',
					special_price:'',
					group_purchase_price:'',
					enable_limit_course:true,
					limit_course:0,
					give_cash_shopping_card_to_parents:true,
					cash_shopping_card_amount:0,
				},
				collect_info_form:[], //活动收集表单信息
				description:[],// 活动详情
				descript_item:{
					'description_type':0,
					'value':'',
				}
			}
		},
		onLoad(options) {
			
			let store_id = parseInt(options.store_id,10);
			if(!store_id>0){
				store_id = uni.getStorageSync('store_id')
			}else{
				uni.setStorageSync('store_id', store_id)
			}
			
			this.store_id = store_id
			this.$store.commit('updateStoreId',store_id)
			
			let type = options.type 
			if('group_purchase' === type){
				this.type = 'group_purchase'
				document.title = '创建团购活动'
			}else{
				this.type = 'special'
				document.title = '创建优惠活动'
			}
			
			// console.log(this.images.length,'this.images.length');
			
			const date = new Date()
			const year = date.getFullYear()
			const month = date.getMonth()+1
			const day = date.getDate()
			const hour = date.getHours()
			const minute = date.getMinutes()
			const second = date.getSeconds()
			
			this.start_date = year.toString() + '-' + (month>=10?month.toString():'0'+month.toString())+ '-' + (day>=10?day.toString():'0'.this.day.ToString())
			this.start_time = '00:00'
			uni.setStorageSync('start_date',this.start_date)
			uni.setStorageSync('start_time',this.start_time)
			
			this.end_date = this.getNextDate(7)
			this.end_time = '00:00'
			uni.setStorageSync('end_date',this.end_date)
			uni.setStorageSync('end_time',this.end_time)
			
		},
		onShow() {
			
			
			
		},
		methods: {
			//上传图片
			uploadBanner(index){
				const that = this;
				uni.chooseImage({
					count:1,
					sizeType: ['original', 'compressed'],
				    success: (chooseImageRes) => {
						console.log(chooseImageRes,'chooseImageRes');
						if(chooseImageRes.tempFiles.length==0){
							
							uni.showToast({
								title:'未选中任何图片',
								icon:'none',
								duration:2000
							})
							return false
						}
						
						if(!/\.(gif|jpg|jpeg|png|bmp)$/.test(chooseImageRes.tempFiles[0].name)) {
							
							uni.showToast({
								title:'图片格式错误，须为gif/jpg/jpeg/png/bmp',
								icon:'none',
								duration:5000,
							})
							return false
						}
						
						uni.getImageInfo({
							src: chooseImageRes.tempFilePaths[0],
							success: (image) => {
								uni.showLoading({
									title: '图片上传中'
								})
								uploadFile(chooseImageRes.tempFilePaths[0]).then(res => {
									
									if(res.status){
										that.images.splice(index,1,res.data.url)
										uni.setStorageSync('images',that.images)
										uni.hideLoading()
									}
								}).catch(err => {
									uni.showToast({
										title:err,
										icon:'none',
										duration:5000,
									})
								})
							}
						})
						
					}
				})
			},
			handleInputName(e){
				uni.setStorageSync('name',this.name)
			},
			//获取当前时间后days天
			getNextDate(days){
				
				const date = new Date()
				// console.log(date.getTime(),'date.getTime()1')
				if(parseInt(days,10)>0){
					date.setTime(date.getTime()+days*24*60*60*1000)
				}
				
				return date.getFullYear().toString() + '-' + ((date.getMonth()+1)>=10?(date.getMonth()+1).toString():'0'+(date.getMonth()+1).toString()) + '-' + (date.getDate()>=10?date.getDate().toString():'0'+date.getDate().toString())
				
			},
			// 处理开始日期、时间
			handleChangeStartDate(e){
				console.log(e,'handleChangeStartDate')
				this.start_date = e.detail.value
				uni.setStorageSync('start_date',this.start_date)
			},
			handleChangeStartTime(e){
				console.log(e,'handleChangeStartTime')
				this.start_time = e.detail.value
				uni.setStorageSync('start_time',this.start_time)
			},
			// 处理结束日期、时间
			handleChangeEndDate(e){
				console.log(e,'handleChangeEndDate')
				this.end_date = e.detail.value
				uni.setStorageSync('end_date',this.end_date)
			},
			handleChangeEndTime(e){
				console.log(e,'handleChangeEndTime')
				this.end_time = e.detail.value
				uni.setStorageSync('end_time',this.end_time)
			},
			// 是否开启剩余20%自动增加名额
			handleEnableAutoAddAllowedTotal(e){
				console.log(e,'handleEnableAutoAddAllowedTotal')
				this.enable_auto_add_allowed_total = e.detail.vaule
				uni.setStorageSync('enable_auto_add_allowed_total',this.enable_auto_add_allowed_total)
			},
			//是否开启没人限购课程总数量
			handleEnableAllowedPurchaseQuantity(e){
				console.log(e,'handleEnableAllowedPurchaseQuantity')
				console.log(e.detail.value,'this.enable_allowed_purchase_quantity')
				this.enable_allowed_purchase_quantity = e.detail.value
				uni.setStorageSync('enable_allowed_purchase_quantity',this.enable_allowed_purchase_quantity)
				if(!e.detail.value){
					this.allowed_purchase_quantity = 0
					uni.setStorageSync('allowed_purchase_quantity',this.allowed_purchase_quantity)
				}
			},
			handleSubtractAllowPurchaseQuantity(e){
				console.log(e,'handleSubtractAllowPurchaseQuantity')
				if(!this.enable_allowed_purchase_quantity){
					this.allowed_purchase_quantity = 0
					uni.setStorageSync('allowed_purchase_quantity',this.allowed_purchase_quantity)
					return false
				}
				
				if(this.allowed_purchase_quantity>1){
					this.allowed_purchase_quantity = this.allowed_purchase_quantity - 1
					uni.setStorageSync('allowed_purchase_quantity',this.allowed_purchase_quantity)
				}
			},
			handleAddAllowPurchaseQuantity(e){
				console.log(e,'handleAddAllowPurchaseQuantity') 
				console.log(this.enable_allowed_purchase_quantity,'this.enable_allowed_purchase_quantity')
				if(!this.enable_allowed_purchase_quantity){
					this.allowed_purchase_quantity = 0
				}else{
					this.allowed_purchase_quantity = this.allowed_purchase_quantity + 1
				}
				
				uni.setStorageSync('allowed_purchase_quantity',this.allowed_purchase_quantity)
				
			},
			
			/*****买课赠课福利设置*****/
			//是否开启买课赠福利设置
			handleEnablePurchaseCourseThenGiveCourse(e){
				console.log(e,'handleEnablePurchaseCourseThenGiveCourse')
				console.log(e.detail.value,'this.enable_purchase_course_then_give_course')
				this.enable_purchase_course_then_give_course = e.detail.value
				uni.setStorageSync('enable_purchase_course_then_give_course',this.enable_purchase_course_then_give_course)
				if(!e.detail.value){
					this.purchase_course = 0
					this.give_course = 0
					uni.setStorageSync('purchase_course',0)
					uni.setStorageSync('give_course',0)
				}
			},
			//买课数量-减
			handleSubtractPurchaseCourseQuantity(e){
				console.log(e,'handleSubtractPurchaseCourseQuantity')
				if(!this.enable_purchase_course_then_give_course){
					this.purchase_course = 0
					this.give_course = 0
					uni.setStorageSync('purchase_course',this.purchase_course)
					uni.setStorageSync('give_course',this.give_course)
					return false
				}
				
				if(this.purchase_course>1){
					this.purchase_course = this.purchase_course - 1
					uni.setStorageSync('purchase_course',this.purchase_course)
				}
			},
			//买课数量-加
			handleAddPurchaseCourseQuantity(e){
				console.log(e,'handleAddPurchaseCourseQuantity')
				if(!this.enable_purchase_course_then_give_course){
					this.purchase_course = 0
					this.give_course = 0
					uni.setStorageSync('purchase_course',this.purchase_course)
					uni.setStorageSync('give_course',this.give_course)
					return false
				}
				
				this.purchase_course = this.purchase_course + 1
				uni.setStorageSync('purchase_course',this.purchase_course)
			},
			//赠课数量-减
			handleSubtractGiveCourseQuantity(e){
				console.log(e,'handleSubtractPurchaseCourseQuantity')
				if(!this.enable_purchase_course_then_give_course){
					this.purchase_course = 0
					this.give_course = 0
					uni.setStorageSync('purchase_course',this.purchase_course)
					uni.setStorageSync('give_course',this.give_course)
					return false
				}
				
				if(this.give_course>1){
					this.give_course = this.give_course - 1
					uni.setStorageSync('give_course',this.give_course)
				}
			},
			//赠课数量-加
			handleAddGiveCourseQuantity(e){
				console.log(e,'handleAddGiveCourseQuantity')
				if(!this.enable_purchase_course_then_give_course){
					this.purchase_course = 0
					this.give_course = 0
					return false
				}
				
				this.give_course = this.give_course + 1
				uni.setStorageSync('give_course',this.give_course)
			},
			
			/*****拼团设置*****/
			//成团人数
			handleInputQuantityGroupPurchase(e){
				console.log(e,'handleInputQuantityGroupPurchase')
				uni.setStorageSync('group_purchase',this.group_purchase)
			},
			// 是否开启虚拟成团
			handleEnableVirtualGroupPurchase(e){
				console.log(e,'handleEnableVirtualGroupPurchase')
				this.group_purchase.enable_virtual_group_purchase = e.detail.value
				uni.setStorageSync('group_purchase',this.group_purchase)
			},
			// 开启虚拟成团后，自动成团的方式
			handleChangeEndGroupPurchaseType(e){
				console.log(e,'handleChangeEndGroupPurchaseType')
				return false
				this.group_purchase.end_group_purchase_type = ''
				uni.setStorageSync('group_purchase',this.group_purchase)
			},
			// 拼团失败是否退款
			handleChangeRefundType(e){
				console.log(e,'handleChangeRefundType')
				this.group_purchase.refund_type = e.detail.value
				uni.setStorageSync('group_purchase',this.group_purchase)
			},
			// 是否开启团长福利
			handleEnableHeadWelfare(e){
				console.log(e,'handleEnableHeadWelfare')
				this.group_purchase.enable_head_welfare = e.detail.value
				uni.setStorageSync('group_purchase',this.group_purchase)
			},
			// 团长福利输入事件
			handleInputHeadWelfareContent(e){
				console.log(e,'handleInputHeadWelfareContent')
				uni.setStorageSync('group_purchase',this.group_purchase)
			},
			//报名页面是否显示“参与他人的团”
			handleShowOtherGroupPurchase(e){
				console.log(e,handleShowOtherGroupPurchase)
				this.group_purchase.show_other_group_purchase = e.detail.value
				uni.setStorageSync('group_purchase',this.group_purchase)
			},
			
			/***** 课程操作 *****/
			handleAddCourse(){
				this.courses.push(this.course_item)
			},
			// 预览
			handlePreview(){
				
			},
			
			// 暂存
			handelStage(){
				
			},
			// 发布
			handlePublish(){
				
			}
			
		}
	}
</script>

<style>
	.go-home{
		width: 60upx;
		height: 60upx;
		border-radius: 50%;
		position: fixed;
		border: 1upx solid #DEDEDE;
		top: 50upx;right: 50upx;
		z-index: 999;
	}
	.go-home>image{
		width: 100%;
		height: 100%;
		border-radius: 50%;
	}
	.shop-name{
		width: 100%;
		padding:0 20upx;
		box-sizing: border-box;
		color: #333;
		font-size: 28upx;
		text-align: center;
		background: #F5F5F5;
	}
	.shop-name>view{
		padding: 20upx 0;
		box-sizing: border-box;
		border-bottom: 1upx solid #DEDEDE;
		display: flex;
		justify-content: space-between;
	}
	.shop-name>view:last-child{
		border-bottom: 0;
	}
	.shop-name>view>image{
		width: 40upx;
		height: 40upx;
	}
	/* 发布成功弹框 */
	.popup_box_de{
		height: 616upx;
		width: 592upx;
		background: #FFFFFF;
		border-radius: 16upx;
		padding-top: 78upx;
		box-sizing: border-box;
		/* z-index: 999; */
	}
	.popup_box_succed-img{
		width: 140upx;
		height: 184upx;
		margin: 0 auto;
	}
	.popup_box_succed-img>image{
		width: 100%;
		height: 100%;
	}
	.popup_box-title-succed{
		text-align: center;
		color: #333333;
		font-size: 34upx;
		margin-top: 58upx;
		font-weight: 800;
	}
	.popup_box-invite{
		width: 480upx;
		height: 80upx;
		line-height: 80upx;
		color: #FFFFFF;
		text-align: center;
		margin: 0 auto;
		margin-top: 76upx;
		background: linear-gradient(to right,#FE9543,#FF664F);
		border-radius: 44upx;
		box-shadow: 0 8upx 16upx 0 rgba(166, 13, 0, 0.23);
		font-size: 32upx;
	}
	.popup_box-tip{
		color: #999999;
		text-align: center;
		font-size: 24upx;
		margin-top: 10upx;
	}
	page{
		background: #F3F3F4;
	}
	.special-group{
		width: 100%;
		height:100%;
		margin-bottom: 110upx;
	}
	.special-group-swiper{
		width: 100%;
		background: #FFFFFF;
		padding-bottom: 30upx;
		box-sizing: border-box;
	}
	.special-group-swiper>view:first-child,.swiper,.swiper>swiper-item>image{
		width: 100%;
	}
	.swiper,.swiper>swiper-item>image{
		width: 100%;
		height: 422upx;
	}
	.swiper-none{
		width: 100%;
		height: 222upx;
		padding-top:200upx;
	}
	.swiper-none{
		background-color: #F5F5F5;
		text-align: center;
		font-size: 32upx;
		color:#666;
	}
	.swiper .discounts-page{
		position: relative;
	}
	.swiper .discounts-page>view{
		position: absolute;
		top: 20upx;left: 0;
		width: 106upx;
		height: 64upx;
		line-height: 64upx;
		background: rgba(0,0,0,0.5);
		border-radius: 0 200upx 200upx 0;
		color: #FFFFFF;
		font-size: 28upx;
		text-align: center;
	}
	.choose-img{
		margin-top: 20upx;
		width: 100%;
		padding: 0 30upx;
		box-sizing: border-box;
	}
	.choose-swiper-img{
		color: #999999;
		font-size: 24upx;
	}
	.choose-img-details{
		display: flex;
		justify-content: space-between;
		margin-top: 40upx;
	}
	.choose-img-common{
		width: 166upx;
		height: 94upx;
		background: #F5F5F5;
		position: relative;
		text-align: center;
	}
	.updata{
		position: absolute;
		top: 50%;left: 50%;
		transform: translate(-50%,-50%);
		width: 88upx;
		height: 32upx;
		line-height: 32upx;
		color: #FFFFFF;
		text-align: center;
		font-size: 22upx;
		background: rgba(0, 0, 0, 0.4);
		border-radius: 16upx;
		/* z-index: 999; */
	}
	.delete-upload-imf{
		width: 32upx;
		height: 32upx;
		position: absolute;
		/* z-index: 777; */
		top: -18upx;right: 0upx;
	}
	.updata-img,.choose-img-detail{
		width: 42upx;
		height: 33upx;
		margin-top: 18upx;
	}
	.upload-img{
		color: #999999;
		font-size: 22upx;
	}
	.img-num{
		width: 30upx;
		line-height: 24upx;
		border-radius: 0 12upx 12upx 0;
		background: rgba(0, 0, 0, 0.5);
		position: absolute;
		top: 0;left: 0;
		/* z-index: 777; */
		color: #FFFFFF;
		font-size: 22upx;
	}
	.act-time-title{
		width: 100%;
		padding: 30upx;
		box-sizing: border-box;
		background: #FFFFFF;
		margin-top: 20upx;
	}
	.explain-title{
		display: flex;
		width: 100%;
	}
	.explain-title>view:first-child{
		width: 8upx;
		height: 32upx;
		background: #FF8B46;
		margin-top: 6upx;
	}
	.explain-title>view:last-child{
		color: #333333;
		font-size: 30upx;
		margin-left: 10upx;
	}
	.act-title-tip{
		width: 100%;
		margin-top: 20upx;
		position: relative;
	}
	.act-title-tip>textarea{
		width: 100%;
		height: 120upx;
		background: #F5F5F5;
		border-radius: 4upx;
		padding: 20upx 20upx 10upx;
		box-sizing: border-box;
		font-size: 28upx;
	}
	.act-title-tip>view{
		color: #999999;
		font-size: 22upx;
		position: absolute;
		bottom: 10upx;right: 20upx;
	}
	.act-time-set{
		width: 100%;
		line-height: 80upx;
		display: flex;
		background: #F5F5F5;
		border-radius: 4upx;
		font-size: 28upx;
		margin-top: 20upx;
	}
	.act-time-set>view:first-child{
		color: #333333;
		width: 30%;
		background: #ECECEC;
		text-align: center;
	}
	.start-data{
		width: 30%;
		color: #333333;
		padding-left: 20upx;
		box-sizing: border-box;
	}
	.start-time{
		width: 30%;
		color: #333333;
	}
	.give-course-coupon,.act-course-set,.group-set{
		width: 100%;
		padding: 30upx;
		box-sizing: border-box;
		background: #FFFFFF;
		margin-top: 20upx;
	}
	.act_explain-title{
		width: 100%;
		display: flex;
		justify-content: space-between;
	}
	.explain_tip{
		color: #999999;
		font-size: 24upx;
	}
	.explain_tip>image{
		width: 100upx;
		height: 60upx;
	}
	.act-title,.clustering-num{
		width: 100%;
		height: 80upx;
		line-height: 80upx;
		background: #F5F5F5;
		border-radius: 4upx;
		margin-top: 20upx;
		display: flex;
	}
	.act-title>view{
		width: 36%;
		background: #ECECEC;
		text-align: center;
		font-size: 28upx;
		color: #333333;
	}
	.act-title>input{
		width: 64%;
		height: 100%;
		padding: 20upx;
		box-sizing: border-box;
		text-align: left;
		font-size: 28upx;
	}
	.add-num,.virtual-join,.buy-course-count{
		width: 100%;
		margin-top: 20upx;
	}
	.add-num>view:first-child{
		width: 100%;
		height: 80upx;
		background: #ECECEC;
		padding:10upx 20upx;
		box-sizing: border-box;
		display: flex;
		justify-content: space-between;
	}
	.add-num>view>text{
		color: #333333;
		font-size: 28upx;
		display: inline-block;
		margin-top: 10upx;
	}
	.add-num>view>image{
		width: 100upx;
		height: 60upx;
		margin-left: 84upx;
		/* margin-top: 10upx; */
	}
	.add-num>view:last-child{
		color: #999999;
		font-size: 24upx;
		margin-top: 6upx;
	}
	.virtual-join>view:first-child{
		width: 100%;
		height: 80upx;
		line-height: 80upx;
		background: #F5F5F5;
		border-radius: 4upx;
		display: flex;
	}
	.virtual-join>view:first-child>view{
		width: 40%;
		color: #333333;
		font-size: 28upx;
		text-align: center;
		background: #ECECEC;
	}
	.virtual-join>view:first-child>input{
		width: 60%;
		height: 80upx;
		text-align: left;
		padding-left: 20upx;
		font-size: 28upx;
	}
	.virtual-join>view:last-child,.buy-course-count>view:last-child{
		color: #999999;
		font-size: 24upx;
		margin-top: 6upx;
	}
	.buy-course-count-set{
		width: 100%;
		height: 80upx;
		display: flex;
		background: #F5F5F5;
		border-radius: 4upx;
	}
	.buy-course-count-set>view:first-child{
		width: 70%;
		height: 80upx;
		background: #ECECEC;
		display: flex;
		justify-content: space-between;
		padding: 10upx 20upx;
		box-sizing: border-box;
	}
	.buy-course-count-set>view:first-child>text{
		color: #333333;
		font-size: 28upx;
		display: inline-block;
		margin-top: 14upx;
	}
	.buy-course-count-set>view:first-child>image{
		width: 100upx;
		height: 60upx;
	}
	.buy-course-amount{
		width: 30%;
		height: 80upx;
		display: flex;
		justify-content: space-around;
	}
	.buy-course-amount>image{
		width: 48upx;
		height: 48upx;
		margin-top: 16upx;
	}
	.buy-course-amount>view{
		color: #333333;
		line-height: 80upx;
		font-size: 30upx;
	}
	.give-course-tip{
		color: #999999;
		font-size: 24upx;
		margin-top: 10upx;
	}
	.buy-give-course{
		color: #333333;
		font-size: 28upx;
		margin-top: 30upx;
	}
	.buy-give-course>text{
		color: #FF391F;
	}
	.buy-give-course-num{
		width: 100%;
		display: flex;
		margin-top: 20upx;
	}
	.buy-give-course-num image{
		width: 48upx;
		height: 48upx;
	}
	.buy-give-course-details{
		display: flex;
	}
	.buy-give-course-details>view{
		margin: 0 20upx;
		width: 156upx;
		height: 48upx;
		line-height: 48upx;
		display: flex;
		justify-content: space-between;
		background: #F2F2F2;
		border-radius: 24upx;
	}
	.buy-give-course-details>text{
		color: #333333;
		font-size: 28upx;
		line-height: 48upx;
	}
	.buy-give-course-details>view>view{
		color: #333333;
		font-size: 30upx;
	}
	.clustering-num>view{
		width: 30%;
		line-height: 80upx;
		background: #ECECEC;
		text-align: center;
		color: #333333;
		font-size: 28upx;
	}
	.clustering-num>input{
		width: 70%;
		height: 80upx;
		line-height: 80upx;
		padding: 0 20upx;
		font-size: 28upx;
		text-align: left;
	}
	.is-open-group{
		width: 100%;
		margin-top: 20upx;
	}
	.is-open-group-tip{
		color: #999999;
		font-size: 24upx;
		margin-top: 6upx;
	}
	.is-open-group-content{
		width: 100%;
		/* height: 254upx; */
		background: #F5F5F5;
		border-radius: 4upx;
	}
	.is-open-group-choose{
		width: 100%;
		height: 31%;
		background: #ECECEC;
		line-height: 80upx;
		padding: 0 20upx;
		box-sizing: border-box;
		display: flex;
		justify-content: space-between;
	}
	.is-open-group-choose>text{
		color: #333333;
		font-size: 28upx;
	}
	.is-open-group-choose>image{
		width: 100upx;
		height: 60upx;
		margin-top: 10upx;
	}
	.is-open-group-time{
		width: 100%;
		padding: 20upx 20upx 30upx;
		box-sizing: border-box;
	}
	.is-open-group-hour>radio-group>label{
		margin-top: 10upx;
	}
	.is-open-group-hour>radio-group>label>view>radio{
		transform: scale(0.7);
	}
	.is-open-group-hour>radio-group>label:first-child>view>radio{
		margin-top: 4upx;
	}
	.is-open-group-hour>radio-group>label>view{
		color: #333333;
		font-size: 28upx;
		margin-left: 10upx;
	}
	.is-open-group-hour>radio-group>label:first-child>view>text{
		line-height: 64upx;
	}
	.is-open-group-hour>radio-group>label>view>input{
		color: #FF391F;
		font-size: 28upx;
		width: 112upx;
		height: 64upx;
		line-height: 64upx;
		background: #FFFFFF;
		padding: 0 20upx;
		box-sizing: border-box;
		text-align: center;
	}
	.is-open-group-hour>radio-group>label:last-child>view:last-child{
		margin-top: 4upx;
	}
	/* .is-open-group-hour>radio-group>label>view>text{
		display: inline-block;
		width: 96upx;
		height: 64upx;
		line-height: 64upx;
		text-align: center;
		background: #FFFFFF;
		color: #FF391F;
	} */
	.group-defeated{
		width: 100%;
		height: 182upx;
		background: #F5F5F5;
		border-radius: 4upx;
		margin-top: 30upx;
	}
	.group-defeated-title{
		width: 100%;
		line-height: 80upx;
		background: #ECECEC;
		padding: 0 20upx;
		box-sizing: border-box;
		color: #333333;
		font-size: 28upx;
	}
	.group-defeated-details{
		width: 100%;
		padding: 32upx 20upx;
		box-sizing: border-box;
		display: flex;
		justify-content: space-between;
	}
	.group-defeated-details image{
		width: 32upx;
		height: 32upx;
		margin-top: 2upx;
	}
	.group-defeated-content,radio-group{
		display: flex;
	}
	.group-defeated-content>radio-group>label>view{
		color: #333333;
		font-size: 28upx;
	}
	.group-defeated-content>radio-group>label>view:last-child{
		margin-top: 4upx;
	}
	.group-defeated-content>radio-group>label>view>radio{
		transform: scale(0.7);
	}
	.header-welfare{
		width: 100%;
		/* height: 200upx; */
		margin-top: 20upx;
		background: #F5F5F5;
		border-radius: 4upx;
	}
	.header-welfare-title{
		width: 100%;
		height: 80upx;
		line-height: 80upx;
		background: #ECECEC;
		padding: 0 20upx;
		box-sizing: border-box;
		display: flex;
		justify-content: space-between;
	}
	.header-welfare-title>text{
		color: #333333;
		font-size: 28upx;
	}
	.header-welfare-title>image{
		width: 100upx;
		height: 60upx;
		margin-top: 10upx;
	}
	.header-welfare-input{
		width: 100%;
		height: 120upx;
	}
	.header-welfare-input>textarea{
		width: 100%;
		height: 100%;
		padding: 20upx;
		box-sizing: border-box;
		font-size: 28upx;
	}
	.is-show-other-group{
		width: 100%;
		margin-top: 20upx;
	}
	.is-show-other-group-title{
		width: 100%;
		height: 80upx;
		line-height: 80upx;
		padding: 0 20upx;
		box-sizing: border-box;
		background: #ECECEC;
		display: flex;
		justify-content: space-between;
	}
	.is-show-other-group-title>text{
		color: #333333;
		font-size: 28upx;
	}
	.is-show-other-group-title>image{
		width: 100upx;
		height: 60upx;
		margin-top: 10upx;
	}
	.is-show-other-group-tip{
		color: #999999;
		font-size: 24upx;
		margin-top: 6upx;
	}
	.join-act-course{
		width: 100%;
		background: #FFFFFF;
		margin-top: 20upx;
		padding: 0 30upx;
		box-sizing: border-box;
		padding-bottom: 16upx;
	}
	.course_type-title{
		width: 100%;
		height: 100upx;
		position: relative;
	}
	.course_type-title>view:first-child{
		width: 236upx;
		height: 66upx;
		background-image: url(https://tool.tuanhaoke.cn/static/image/home/home_image_background.png);
		background-repeat: no-repeat;
		background-size: 1005 100%;
		text-align: center;
		font-size: 30upx;
		color: #FFFFFF;
		line-height: 66upx;
		position: absolute;
		top: -4upx;left: 50%;
		transform: translate(-50%,0);
	}
	.join-act-course-details{
		width: 100%;
		padding: 32upx 20upx 20upx;
		box-sizing: border-box;
		background: #FFFFFF;
		box-shadow: 0 2upx 22upx 0 rgba(0, 0, 0, 0.09);
		border-radius: 10upx;
		position: relative;
	}
	.join-act-course-details>image{
		width: 40upx;
		height: 40upx;
		position: absolute;
		top: -20upx;
	}
	.join-course-title{
		width: 100%;
		display: flex;
		justify-content: space-between;
		margin-top: 20upx;
	}
	.join-course-title-img{
		width: 160upx;
		height: 120upx;
		position: relative;
	}
	.no-img{
		width: 160upx;
		height: 120upx;
		position: relative;
		background: #F5F5F5;
	}
	.no-img>image{
		width: 42upx;
		height: 33upx;
		margin-top: 30upx;
		margin-left: 60upx;
	}
	.no-img>view{
		width: 100%;
		text-align: center;
		color: #999999;
		font-size: 22upx;
	}
	.join-course-title-img>image{
		width: 100%;
		height: 100%;
		position: absolute;
		top: 0;left: 0;
	}
	.masking{
		width: 100%;
		height: 100%;
		background: rgba(0, 0, 0, 0.2);
		position: absolute;
		top: 0;left: 0;
		/* z-index: 666; */
	}
	.change-photo{
		width: 104upx;
		height: 32upx;
		line-height: 32upx;
		background: rgba(0, 0, 0, 0.4);
		border-radius: 2upx;
		position: absolute;
		top: 50%;left: 50%;
		transform: translate(-50%,-50%);
		color: #FFFFFF;
		font-size: 22upx;
		text-align: center;
	}
	.join-course-title-input{
		width: 480upx;
		height: 120upx;
		background: #F5F5F5;
		position: relative;
	}
	.join-course-title-input>textarea{
		width: 100%;
		height: 100%;
		font-size: 28upx;
		padding: 20upx;
		box-sizing: border-box;
	}
	.join-course-title-input>view{
		color: #999999;
		font-size: 22upx;
		position: absolute;
		bottom: 10upx;right: 20upx;
	}
	.commodity-original-price,.act-address,.alone-buy-discounts,.give-shopping-card-money,.join-group-price-content,.restricted-purchase-content{
		width: 100%;
		margin-top: 20upx;
		height: 80upx;
		display: flex;
		background: #F5F5F5;
		border-radius: 4upx;
	}
	.commodity-original-price>view,.join-group-price-content>view,.act-address-title{
		width: 30%;
		line-height: 80upx;
		background: #ECECEC;
		font-size: 28upx;
		text-align: center;
	}
	.alone-buy-discounts>view,.give-shopping-card-money>view{
		width: 30%;
		background: #ECECEC;
		font-size: 26upx;
		padding: 8upx 20upx;
		box-sizing: border-box;
	}
	.commodity-original-price>input,.alone-buy-discounts>input,.join-group-price-content>input,.give-shopping-card-money>input{
		width: 70%;
		text-align: left;
		padding: 0 20upx;
		box-sizing: border-box;
		height: 80upx;
		font-size: 28upx;
	}
	.join-group-price{
		width: 100%;
	}
	.join-group-price-tip,.restricted-purchase-tip,.give-shopping-card-tip{
		color: #999999;
		font-size: 24upx;
		margin-top: 6upx;
	}
	.restricted-purchase,.give-shopping-card,.give-shopping-card{
		width: 100%;
		margin-top: 20upx;
	}
	.restricted-purchase-content-open{
		width: 70%;
		height: 80upx;
		background: #ECECEC;
		display: flex;
		justify-content: space-between;
		padding: 10upx 40upx 10upx 20upx;
		box-sizing: border-box;
	}
	.restricted-purchase-content-open>text{
		color: #333333;
		font-size: 28upx;
		margin-top: 14upx;
	}
	.restricted-purchase-content-open>image,.give-shopping-card-content>image{
		width: 100upx;
		height: 60upx;
	}
	.restricted-purchase-content-num{
		width: 30%;
		display: flex;
		justify-content: space-around;
		height: 80upx;
	}
	.restricted-purchase-content-num>view{
		line-height: 80upx;
		font-size: 30upx;
		color: #333333;
	}
	.restricted-purchase-content-num>image{
		width: 48upx;
		height: 48upx;
		margin-top: 16upx;
	}
	.give-shopping-card-content{
		width: 100%;
		height: 80upx;
		background: #ECECEC;
		display: flex;
		justify-content: space-between;
		padding: 10upx 20upx;
		box-sizing: border-box;
	}
	.give-shopping-card-content>text{
		color: #333333;
		font-size: 28upx;
		display: inline-block;
		margin-top: 14upx;
	}
	.give-shopping-card-details{
		width: 100%;
		margin-top: 30upx;
	}
	.give-shopping-card-details>view:first-child{
		color: #333333;
		font-size: 28upx;
	}
	.give-shopping-card-details>view:first-child>text{
		color: #FF391F;
	}
	.give-shopping-card-details>view:last-child{
		color: #999999;
		font-size: 24upx;
		margin-top: 20upx;
	}
	.act-address-choose{
		width: 77%;
		display: flex;
		justify-content: space-between;
		padding: 20upx 20upx;
		box-sizing: border-box;
	}
	.act-address-choose>image{
		width: 12upx;
		height: 20upx;
		margin-top: 10upx;
	}
	.act-address-choose>text{
		font-size: 28upx;
		color: #999999;
	}
	.subject-details{
		width: 100%;
		margin-top: 20upx;
		background: #F5F5F5;
		border-radius: 4upx;
	}
	.subject-details-title{
		width: 100%;
		height: 80upx;
		background: #ECECEC;
		display: flex;
	}
	.subject-details-title>text{
		display: inline-block;
		color: #333333;
		font-size: 28upx;
		line-height: 80upx;
	}
	.subject-details-title>text:nth-child(1){
		margin-left: 224upx;
	}
	.subject-details-title>text:nth-child(2){
		color: #999999;
		margin-left: 10upx;
	}
	.subject-details-title>image{
		width: 20upx;
		height: 20upx;
		margin-top: 34upx;
	}
	.text-img-content{
		width: 100%;
		padding-top: 20upx;
		box-sizing: border-box;
		background: #F5F5F5;
	}
	.pack-up-details{
		width: 100%;
		height: 64upx;
		display: flex;
		background: #ECECEC;
	}
	.pack-up-details>text{
		display: inline-block;
		color: #333333;
		font-size: 28upx;
		line-height: 64upx;
		margin-left: 274upx;
	}
	.pack-up-details>image{
		width: 14upx;
		height: 14upx;
		transform: rotate(-90deg);
		margin-left: 10upx;
		margin-top: 26upx;
	}
	.text-img-details{
		width: 100%;
		padding: 0 20upx;
		padding-bottom: 20upx;
		box-sizing: border-box;
	}
	.text-img-details>view:last-child{
		margin-bottom: 0;
	}
	.img-details{
		width: 100%;
		/* height: 340upx; */
		background: #ECECEC;
		position: relative;
		margin-bottom: 56upx;
	}
	.text-details{
		width: 100%;
		height: 340upx;
		background: #ECECEC;
		position: relative;
		margin-bottom: 56upx;
	}
	.img-content{
		width: 100%;
		height: 100%;
	}
	.delete-img{
		width: 38upx;
		height: 38upx;
		position: absolute;
		top: -20upx;left: -20upx;
		/* z-index: 777; */
	}
	.rank-img{
		width: 38upx;
		height: 38upx;
		position: absolute;
		top: -20upx;right: -20upx;
		/* z-index:777; */
	}
	.text-details>textarea{
		width: 100%;
		height: 100%;
		font-size: 28upx;
		color: #333333;
		padding: 20upx;
		box-sizing: border-box;
	}
	.add-img-text{
		width: 100%;
		display: flex;
		justify-content: space-between;
	}
	.add-details{
		width: 48%;
		height: 64upx;
		display: flex;
		background: #FFFFFF;
	}
	.change-img{
		width: 230upx;
		height: 48upx;
		line-height: 48upx;
		text-align: center;
		border-radius: 40upx;
		position: absolute;
		top: 50%;left: 50%;
		transform: translate(-50%,-50%);
		color: #FFFFFF;
		font-size: 28upx;
		background: rgba(0,0,0,0.4);
	}
	.add-details>image{
		width: 40upx;
		height: 40upx;
		margin-left: 68upx;
		margin-top: 12upx;
		margin-right: 10upx;
	}
	.add-details>text{
		color: #FF8B46;
		font-size: 28upx;
		line-height: 64upx;
	}
	.add-course{
		width: 600upx;
		height: 80upx;
		line-height: 80upx;
		text-align: center;
		margin: 0 auto;
		margin-top: 32upx;
		font-size: 32upx;
		color: #FFFFFF;
		background: linear-gradient(to right,#FE9543,#FF664F);
		border-radius: 44upx;
		box-shadow: 0 8upx 16upx 0 rgba(166, 13, 0, 0.23);
	}
	.apply-msg,.act-detail{
		width: 100%;
		padding: 30upx;
		box-sizing: border-box;
		background: #FFFFFF;
		margin-top: 20upx;
	}
	.apply-msg-contain{
		width: 100%;
		/* height: 160upx; */
		background: #F5F5F5;
		border-radius: 4upx;
		margin-top: 20upx;
	}
	.apply-msg-all{
		width: 100%;
		height: 80upx;
		line-height: 80upx;
		padding-left: 20upx;
		box-sizing: border-box;
		background: #ECECEC;
		font-size: 28upx;
		color: #333333;
	}
	.apply-msg-content{
		width: 100%;
		height: 50%;
		line-height: 80upx;
		display: flex;
	}
	.apply-msg-content>text{
		display: inline-block;
		color: #333333;
		font-size: 28upx;
		margin-left: 20upx;
	}
	.add-form-tip{
		text-align: center;
		color: #999999;
		font-size: 24upx;
		margin-top: 20upx;
	}
	.act-detail-contain{
		width: 100%;
		padding: 30upx 20upx;
		box-sizing: border-box;
		background: #F5F5F5;
		border-radius: 4upx;
		margin-top: 20upx;
	}
	.act-status{
		width: 100%;
		height: 100upx;
		background: #FFFFFF;
		display: flex;
		justify-content: space-around;
		position: fixed;
		left: 0;bottom: 0;
		/* z-index: 888; */
	}
	.act-common{
		width: 220upx;
		height: 64upx;
		line-height: 64upx;
		margin-top: 18upx;
		text-align: center;
		font-size: 28upx;
		border: 2upx solid #FF8B46;
		border-radius: 44upx;
		color: #FF8B46;
	}
	.publish{
		border: 0;
		color: #FFFFFF;
		background: linear-gradient(to right,#FE9543,#FF664F);
		box-shadow: 0 4upx 12upx 0 rgba(250, 176, 48, 0.55);
	}
</style>
